package com.foreknow.dao;

import com.foreknow.bean.Admin;
import com.foreknow.bean.Guestbook;

import java.sql.SQLException;
import java.util.List;

public interface GuestbookDao {
  /**
   * 查询所有留言信息
   * @return
   * @throws SQLException
   */
  public List<Object> getQueryAll()throws SQLException;
  /**
   * 添加管理员信息
   * @param guestbook
   * @return
   */
  public boolean save(Guestbook guestbook) throws SQLException;
  /**
   * 根据id删除
   * @param id
   * @return boolean
   */
  public boolean delete(Integer id) throws SQLException;
  /**
   * 修改
   * @param guestbook
   * @return boolean
   */
  public boolean update(Guestbook guestbook) throws SQLException;
  /**
   * 根据id查询管理员信息
   * @param id
   * @return Admin
   */
  public Guestbook queryById(Integer id) throws SQLException;
}
